<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="/WEB-INF/tld/PagingA.tld" prefix="pagingTagA"%>
<section id="listLatestChapter" class="boxSubject corner rightShadow"  style="float: left;width: 758px;margin-top: 20px;">
	<div class="boxTitle topCorner3">
		<h2>Danh sách truyện yêu thích</h2>
	</div>
<c:choose>
	<c:when test="${userInfo != null}">
		<ul>
			<c:choose>
				<c:when test="${lstItem.size() > 0}">
					<c:if test="${pInfo.totalPage > 1}">
						<section class="pagination">
							<spring:url value="/thanh-vien/danh-sach-truyen-yeu-thich" var="link" />
								<pagingTagA:paging searchUrl="${link}" curPageParam="-trang-" 
										searchValueParam=".htm" pagingInf="${pInfo}"></pagingTagA:paging>
						</section>
					</c:if>
					<c:forEach items="${lstItem}" var="item">
						<li>
							<a class="textOverflow corner3" href='${item.urlTruyen}' title="Đọc truyện ${item.nameTruyen}">${item.nameTruyen}</a>
						</li>
					</c:forEach>
					<c:if test="${pInfo.totalPage > 1}">
						<section class="pagination">
							<spring:url value="/thanh-vien/danh-sach-truyen-yeu-thich" var="link" />
								<pagingTagA:paging searchUrl="${link}" curPageParam="-trang-" 
										searchValueParam=".htm" pagingInf="${pInfo}"></pagingTagA:paging>
						</section>
					</c:if>
			</c:when>
			<c:otherwise>
				<li>Bạn chưa đánh dấu yêu thích truyện nào cả</li>
			</c:otherwise>
			</c:choose>
		</ul>
	</c:when>
	<c:otherwise>
		Bạn chưa đăng nhập
	</c:otherwise>
</c:choose>
</section>
